<?php
require_once dirname(__FILE__) . '/../includes/common.inc.php';
require_once dirname(__FILE__) . '/../includes/pdoorm.inc.php';

header('Content-Type: text/plain');

$sql="
    insert into ns_v1packageitemselect
    SELECT a.*,ifnull(b.oid_a,0) AS packageitem_id FROM ns_packageitemselect AS a LEFT JOIN  ns__ez_relation_packageitem_packageitemselect AS b
ON a.e_oid = b.oid_b
";

sql_execute($sql);
